import Vue from 'vue'
import Router from 'vue-router'
/*
 import Select from '@/components/Select'
 import Point from '@/components/Point'
 import Author from '@/components/Author' */
Vue.use(Router)
const Home = resolve => require(['../Home'], resolve)
const Select = resolve => require(['../components/Select'], resolve)
const Point = resolve => require(['../components/Point'], resolve)
const Author = resolve => require(['../components/Author'], resolve)
const News = resolve => require(['../components/Article'], resolve)

export default new Router({
  linkActiveClass: 'active',
  // 路由配置
  routes: [
    { path: '/', redirect: '/select' },
    {
      path: '/',
      component: Home,
      children: [
        {path: 'select', component: Select},
        {path: 'point', component: Point},
        {path: 'author', component: Author}
      ]
    },
    {path: '/news/:id', component: News}
  ]
})
